package edu.pku.sei.transformation.editor.views.figures;

import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;

import edu.pku.sei.transformation.editor.views.icons.IconsProvider;

public class LiteralDomainFigure extends DomainFigure {
	private Label content = new Label("testtttttttttttttttttttttttttttt");

	public LiteralDomainFigure() {
		super();
		content.setLocation(new Point(0, 0));
		content.setSize(this.getBounds().width, this.getBounds().height);
		super.add(content);
		this.nameLabel.setIcon(IconsProvider
				.getImage(IconsProvider.AREA_TEXT_ICO));
	}

	@Override
	public void setBounds(Rectangle rect) {
		super.setBounds(rect);
		content.setSize(this.getBounds().width, this.getBounds().height);
		content.setLocation(rect.getLocation());
	}

	public void setContext(String s) {
		content.setText(s);
	}
}
